import React, { FC } from 'react';
import { listItem } from '../utils/Article';
import "../static/font_article/iconfont.css"
import "./articleItem.less"
import theTime from '../services/module/index'
import { Link } from 'umi'
interface Iitem {
  item: listItem;
}
const ArticleItem: FC<Iitem> = (props) => {
  let item = props.item;


  return (
      <div className='content'>
        <div className="ArticleItem">
          <Link to={`/Article/Detail?id=${item.id}`} key={item.id}>
            <div className="top">
              <h2>{item.title}</h2>
              {/* <span>{theTime(item.createAt)}</span> */}
            </div>
            <dl>
              <dt>
                <img src={item.cover} alt="" />
              </dt>
              <dd>
                <p>{item.summary}</p>
                <div>
                  <span> <i className="iconfont icon-shoucang"></i> {item.likes}</span>
                  <p>·</p>
                  <span> <i className="iconfont icon-kanguo"></i> {item.views}</span>
                  <p>·</p>
                  <span> <i className="iconfont icon-fenxiang"></i> 分享</span>
                </div>
              </dd>
            </dl>
          </Link>
        </div>
      </div>

  );
};

export default ArticleItem;
